package com.tm.userserver.client;


import com.tm.commonutils.dto.OrderDTO;
import com.tm.commonutils.model.OrderModel;
import com.tm.commonutils.utils.R;
import com.tm.userserver.client.impl.OrderClientImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "order-server",fallback = OrderClientImpl.class)
public interface OrderClient {

              
    @GetMapping("order1/getOrderTest")
    String getOrderTest();


    @GetMapping("order1/{id}")
    public R<OrderModel> order(@PathVariable("id")  Long id);


    @GetMapping("order1/list")
    public R<List<OrderModel>> list();


    @PostMapping("order1")
    public R save(@RequestBody OrderDTO orderDTO);


    @DeleteMapping("order1")
    public R delByOrderId(@RequestParam (value = "id")Long id);

    @PutMapping("order1")
    public R updateById(@RequestBody OrderDTO orderDTO);
}
